void processCheck( int amount ) { int charge; if ( balance < 100000 ) charge = 15; else charge = 0; balance = balance - amount - charge ; }
The complete class is defined as:
class CheckingAccount
{
// instance variables
String accountNumber;
String accountHolder;
int balance;
//constructors
CheckingAccount( String accNumber, String holder, int start )
{
accountNumber = accNumber ;
accountHolder = holder ;
balance = start ;
}
// methods
int getBalance()
{
return balance ;
}
void processDeposit( int amount )
{
balance = balance + amount ;
}
void processCheck( int amount )
{
int charge;
if ( balance < 100000 )
charge = 15;
else
charge = 0;
balance = balance - amount - charge ;
}
}
Now that the coding is complete, are we done?